﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ENVIS.Facade;
using DevExpress.XtraBars.Docking;
using System.Windows.Forms;
using ENVIS.Model;

namespace PanelPlugin.eplug
{
    [PluginDesc("PanelPlug", "ENG........")]
    [PluginDesc("cs", "PanelPlug", "CZ.............")]
    [PluginMenu("Create Panel")]
    [PluginMenu("cs", "Vytvořit Panel")]
    public class PanelPlugin : IBasePanelPlugin
    {
        #region IBasePanelPlugin Members

        public void CreatePanel(IDataSource ds, DevExpress.XtraBars.Docking.DockManager DM)
        {
            DockPanel panel = DM.AddPanel(DockingStyle.Bottom);
            if (DM.Panels.Count > 1) panel.DockAsTab(DM.RootPanels[0]); else panel.Height = 10000;
            panel.Text = "Panel" + "";
            panel.TabText = "P:" + "";
            XtraUserControl1 control = new XtraUserControl1();
            control.Dock = DockStyle.Fill;
            panel.Controls.Add(control);
            
        }

        #endregion
    }
}
